<%@page contentType="text/html; charset=gb2312"%>
<%@page import="java.sql.*"%>
<%@page import="javax.sql.DataSource"%>
<%@page import="javax.naming.*"%>
<%@ include file="/include.jsp"%>
<%
   String  strValue="";
   String ids=request.getParameter("reportId");
   if(ids==null)
   {
      ids="-1";
   }
   else
   if(ids.toLowerCase().indexOf("=")>-1)
   {
     ids=ids.substring(0,ids.indexOf("="));
     strValue=ids.substring(ids.indexOf("=")+1,ids.length());
   }

   String pars=request.getParameter("pars");
   if(pars==null)
   {
     pars=strValue.replace(":","^");
   }
   else
   {
     pars=pars.replace(":","^");
   }

   pars=new String(pars.getBytes("GB2312"),"gb2312");

   String strdigRptStyle=(String)request.getParameter("digRptStyle");
   if(null==strdigRptStyle||strdigRptStyle.equals("")) strdigRptStyle="1";
%>
<jsp:useBean id="callprocedure" class="com.asiainfo.cityReport.javaBeans.CityReportBasic" scope="page"></jsp:useBean>
<jsp:setProperty name="callprocedure" property="reportId" value="<%=Integer.parseInt(ids)%>"/>
<jsp:setProperty name="callprocedure" property="cityId" value="<%=m_strLoginCityID%>"/>
<%
     callprocedure.selectTable();
     String[] parsArray=callprocedure.strToArray(pars,"^");
   try
  {
      String strPar="";
      for(int i=0;i<parsArray.length;i++)
      {
        strPar=strPar+"'"+parsArray[i]+"'^";
      }
%>
<html>
<script language=javascript>
   function showMenu_report(target,left,top,width,height,name)
   {
        var url1 ="/newCityReport/view/queryReport.jsp?pars=<%=strPar%>&userId=<%=m_strLoginUserID%>&roleId=<%=m_strLoginGroupID%>&reportId=<%=ids%>";
         if(width=='null'||width==''||width=='0') width='800';
         if(height=='null'||height==''||height=='0') height='600';
         if(left=='null'||left==''||left=='0') left=(screen.width-width*1)/2;
         if(top=='null'||top==''||top=='0') top=(screen.height-height*1)/2;
          window.open(url1,'',"z-look=yes,width="+width+",height="+height+",top="+top+",left="+left+",scrollbars=no,resizable=yes,toolbars=yes");
          window.close();
       }
</script>
<body  onload="showMenu_report('<%=callprocedure.getTarget()%>','<%=callprocedure.getLeft()%>','<%=callprocedure.getTop()%>','<%=callprocedure.getWidth()%>','<%=callprocedure.getHeight()%>','<%=callprocedure.getReportName()%>')">
<form action="">
  <input type="hidden" name="reportid" id="reportId" />
   <input type="hidden" name="pars" id="pars" />
</form>
</body>
</html>
<%
}
  catch (Exception e) {
    //System.out.print(e.getMessage());
  }
  finally {

  }
%>
